home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
HYP
/
H-I
/
HyperHackers.cpt
/
Hyper-Hackers Queue 1.0
/
card_22889.txt
< prev
next >
Wrap
Text File
|
1989-02-26
|
1KB
|
38 lines
-- card: 22889 from stack: in.0
-- bmap block id: 0
-- flags: 0000
-- background id: 3797
-- name:
-- part contents for background part 1
----- text -----
From: edmoy@violet.berkeley.edu
Date: 1 Mar 88 21:25:11 GMT
I don't know if this is only in HyperCard or a general Mac problem, but
I do know that what works on the Mac 2 fails on a Mac+.
I was writing an XFCN for HyperCard, using a handle to data storage needed by
the XFCN. The XFCN was written in LightSpeed C, but I think the problem
would show up in any C compiler. In the data is an array of Pascal strings.
Originally the array was declared:
char field[NFIELDS][17];
The maximum string length is 16, plus one for the length byte. This worked
fine on my Mac 2, but crashed on my Mac+ when indexing odd numbered strings.
When I changed this to:
char field[NFIELDS][18];
it worked on the Mac+. This seems to indicate that Pascal strings must be
word aligned on a Mac+, but not necessarily on a Mac 2.
-- part contents for background part 45
----- text -----
Word Alignment of Pascal Strings on Mac vs Mac 2